package com.oss.mq.controller;

import com.oss.mq.common.ResponseBean;
import com.oss.mq.entity.pojo.TaskQueue;
import com.oss.mq.service.ITaskQueueService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Author yaoyaoyao
 * Date 2024/7/17 15:21
 */
@RestController("/queue")
public class TaskQueueController {
    @Autowired
    ITaskQueueService taskQueueService;

    @PostMapping("newTask")
    public ResponseBean addNewTask(TaskQueue taskQueue){
        return ResponseBean.success(taskQueueService.addTaskQueue(taskQueue));
    }
}
